package com.lboyang.seckill.service.impl;

import com.lboyang.seckill.entity.Goods;
import com.lboyang.seckill.entity.vo.GoodsVo;
import com.lboyang.seckill.mapper.GoodsMapper;
import com.lboyang.seckill.service.GoodsService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author Aiguodala
 * @since 2021-05-23
 */
@Service
public class GoodsServiceImpl extends ServiceImpl<GoodsMapper, Goods> implements GoodsService {

    /**
     * 获取商品列表
     * @return
     */
    @Override
    public List<GoodsVo> listGoodsVo() {
        return baseMapper.listGoodsVo();
    }

    /**
     * 商品详情
     * @param goodsId
     * @return
     */
    @Override
    public GoodsVo getGoodsVoById(Long goodsId) {
        return baseMapper.getGoodsVoById(goodsId);
    }
}
